chore: update Hilt ViewModel imports and optimize build configuration#2020
Merged
Conversation
Refactors Hilt ViewModel usage across the app and optimizes the build system for better performance and alignment with modern Jetpack Compose patterns. This includes updating deprecated API usage in lyrics rendering and navigation.
- **Hilt & Navigation:** Updated `hiltViewModel()` imports from `androidx.hilt.navigation.compose` to `androidx.hilt.lifecycle.viewmodel.compose` across all presentation screens.
- **Compose UI:**
- Replaced deprecated `ClickableText` with `Text` using the modern `LinkAnnotation` and `withLink` APIs for lyrics providers.
- Updated `PlaylistBottomSheet` to use `BottomSheetDefaults.modalWindowInsets`.
- Switched `PlaylistAdd` icons to `AutoMirrored` variants for better RTL support.
- **Build & Performance:**
- Upgraded JVM target to JVM 21.
- Increased Gradle heap size (`-Xmx`) to 4GB to prevent memory exhaustion during builds.
- Removed redundant `StrongSkipping` Compose compiler flag as it is now enabled by default.
- Added `-Xannotation-default-target=param-property` to Kotlin compiler arguments.
- **Data & Networking:**
- Improved null safety when accessing `OkHttp` response bodies.
- Suppressed deprecation warnings in legacy media services and repository implementations.
- Refactored `SongMetadataEditor` for better temp file management and container detection.
- **Resources:**
- Added comprehensive localized changelog entries for versions 0.2.0 through 0.6.0.
- Added instructions for beta issue reporting in `strings_presentation_batch_g.xml`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactors Hilt ViewModel usage across the app and optimizes the build system for better performance and alignment with modern Jetpack Compose patterns. This includes updating deprecated API usage in lyrics rendering and navigation.
hiltViewModel()imports fromandroidx.hilt.navigation.composetoandroidx.hilt.lifecycle.viewmodel.composeacross all presentation screens.ClickableTextwithTextusing the modernLinkAnnotationandwithLinkAPIs for lyrics providers.PlaylistBottomSheetto useBottomSheetDefaults.modalWindowInsets.PlaylistAddicons toAutoMirroredvariants for better RTL support.-Xmx) to 4GB to prevent memory exhaustion during builds.StrongSkippingCompose compiler flag as it is now enabled by default.-Xannotation-default-target=param-propertyto Kotlin compiler arguments.OkHttpresponse bodies.SongMetadataEditorfor better temp file management and container detection.strings_presentation_batch_g.xml.This PR makes a lot of changes to update deprecated APIs and cleanup warnings during build time for both Debug and Release builds. I apologize for the amount, I did not expect there to be so much either.